$(function () {
  new Vue({
    el: "#patientsInfo",
    data:{
      dataList:[],
      token:localStorage.getItem("token")
    },
    methods:{
      getPatientsInfo:function () {
        var that = this;
        axios.get("../api/patients/getInfo",
            {headers:{'token':localStorage.getItem("token")}}).then(function(response){
          if (response.data.code!="0"){
            alert(response.data.msg)
          }
          that.dataList = response.data.data.list;
          console.log(that.dataList)
        }).catch(function(err){
          console.log(err);
        });
      }
    },
    created() {
      this.getPatientsInfo();
    }
  });

});